<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        #outer {
            margin: 50px auto;
            padding: 20px;
            width: 260px;
            height: 260px;
            border: 10px solid #000;
            /* overflow: hidden; */
        }

        #inner {

            padding: 20px;
            height: 200px;
            border: 10px solid #f00;
        }

        #center {
            height: 180px;
            border: 10px solid #ff0;



        }
    </style>
</head>

<body>

    <div id="outer">
        <div id="inner">
            <div id="center"></div>
        </div>
    </div>
    <script src="./js/utils.js"></script>

    <script>
        let outer = document.getElementById('outer')
        let inner = document.getElementById('inner')
        let center = document.getElementById('center')
        document.documentElement.scrollTop = 6000


        /*
        offsetParent 当前盒子的父级参照物节点元素对象。父级参照物可以改变。改变元素定位 relative,absolute,fixed

        outer.offsetLeft
        outer.offsetTop
        outer.offsetParent

        */

    </script>
</body>

</html>